import config from '../config/config';
import request from '../utils/request';

let service = {};
//砍价轮播
service.getCycleMsg = (param, cb, ca) => {
  param = param || {};
  let requestUrl = config.api.getCycleMsg;
  request({
    url: requestUrl,
    showLoading: false,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    },
    fail: res => {

    }
  });
}
//砍价商品详情
service.getBargainGoods = (param, cb, ca) => {
  param = param || {};
  let requestUrl = config.api.getBargainGoods;
  request({
    url: requestUrl,
    showLoading: false,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    },
    fail: res => {

    }
  });
}

//砍价订单详情
service.getbargainorderdetail = (param, cb, ca) => {
  param = param || {};
  let requestUrl = config.api.getbargainorderdetail;
  request({
    url: requestUrl,
    showLoading: false,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    },
    fail: res => {

    }
  });
}


module.exports = service;